/**
 * @des 获取环境变量
 */
function isEnv(): Env
function isEnv(mode: Env): boolean
function isEnv(param: any = '') {
  const MODE = import.meta.env.MODE
  if (!param) {
    return MODE
  }
  if (param === MODE)
    return true
  return false
}

export { isEnv }

/**
 * @des 判断本地环境
 * @returns
 */
export function isLocale() {
  const url = window.location.href
  return (
    url.includes('192.168')
    || url.includes('127.0.0.1')
    || url.includes('localhost')
  )
}
